package com.lei.day05lx.model;

import com.lei.day05lx.APi;
import com.lei.day05lx.contract.LoginContract;
import com.lei.tong.retrofit.NetWorkManger;

import java.util.HashMap;

import io.reactivex.Observable;

public class LoginModel implements LoginContract.Model {
    @Override
    public Observable login(HashMap<String, String> map) {
        APi creat = NetWorkManger.getInstance("https://www.wanandroid.com/user/")
                .creat(APi.class);
        return creat.login(map);
    }

    @Override
    public Observable register(HashMap<String, String> map) {
        APi creat = NetWorkManger.getInstance("https://www.wanandroid.com/user/")
                .creat(APi.class);
        return creat.register(map);
    }

    @Override
    public Observable dxc(HashMap<String, String> map) {
        APi creat = NetWorkManger.getInstance("http://www.qubaobei.com/").creat(APi.class);
        return creat.initdata(map);
    }

    @Override
    public void destroy() {

    }
}
